/*
	
*/
#include <iostream>
using namespace std;

class three_d {
	int x, y, z;

	public:
		three_d(int a, int b, int c) {
			x = a;
			y = b;
			z = c;
		}
		friend ostream & operator << (ostream & s, three_d obj);
		friend istream & operator >> (istream & s, three_d & obj);
};

ostream & operator << (ostream & s, three_d obj) {
	s << obj.x << ",";
	s << obj.y << ",";
	s << obj.z << "\n";

	return s;
}

istream & operator >> (istream & s, three_d & obj) {
	s >> obj.x;
	s >> obj.y;
	s >> obj.z;
	return s;
}

int main(int argc, char * argv[]) {
	three_d a(1, 2, 3);

	cout << a;
	cin >> a;
	cout << a;
}

